/**
 *
 */
package com.ybkj.daijia.server.service.impl;


import com.ybkj.daijia.server.mapper.OrderOrbitMapper;
import com.ybkj.daijia.server.model.OrderOrbit;
import com.ybkj.daijia.server.service.OrderOrbitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author Shine
 *
 */
@Service
public class DefaultOrderOrbitService implements OrderOrbitService {

    @Autowired
    private OrderOrbitMapper orderOrbitMapper;

    @Override
    public OrderOrbit findByOrder(Long orderId) {

        return orderOrbitMapper.selectByOrder(orderId);
    }

    @Transactional(rollbackFor = Exception.class)
    public OrderOrbit create(OrderOrbit orbit) {
        orderOrbitMapper.insertRecord(orbit);
        return orbit;
    }


}